package {
  import org.flixel.*;
  
  // Door object for Starting / Finishing a level
  public class Door extends FlxSprite {
  
    // Classification of Door Object
    private var isExit:Boolean
    
    // Art for Doors
    [Embed(source="Door1.png")]
	private var startSprite:Class;
    
    [Embed(source="Door2.png")]
	private var exitSprite:Class;
    
    // Create a Door object (Start Position / Goal)
    public function Door(X: Number, Y: Number, Exit:Boolean) {
      super(X, Y);
      isExit = true;
      
      // Current Bounding Box
      width = 40;
      height = 50;
      
      // For now, signify by color
      if (Exit) {
        loadGraphic(exitSprite, true, true, 40, 50, true); 
        //makeGraphic(width, height, 0xffff2020);
      } else {
        loadGraphic(startSprite, true, true, 40, 50, true); 
        //makeGraphic(width, height, 0xff20ff20);
      }
    }
  }
}